import { Component, OnInit } from '@angular/core';
import {GetInfoService} from '../services/get-info.service';

@Component({
  selector: 'app-stcheng',
  templateUrl: './stcheng.component.html',
  styleUrls: ['./stcheng.component.css']
})
export class StchengComponent implements OnInit {
  plc: Array<Pro>;
  data = [
    {
      sTop: '全部'
    },
    {
      sTop: '便利店服务'
    },
    {
      sTop: '洗涤服务'
    },
    {
      sTop: '家政服务'
    },
    {
      sTop: '家庭维修'
    },
    {
      sTop: '搬家服务'
    },
    {
      sTop: '汽车服务'
    },
    {
      sTop: '网购服务'
    },
    {
      sTop: '旅游服务'
    },
    {
      sTop: '拍照服务'
    },
    {
      sTop: '婚庆服务'
    },
    {
      sTop: '互联网服务'
    }
  ];
  constructor(private getIngo: GetInfoService) { }

  ngOnInit() {
    this.getIngo.getTong((data) => {
      this.plc = data;
    });
  }

}
// 自定义一个借口, 可以让外界访问
export interface Pro {
  imgs: string;
  daclass: string;
  xiclass: string;
  depict: string;
  price: number;
}
